#!/usr/bin/python3
# -*- coding: utf-8 -*-
from common import requests_public
from testFile import read_yaml
from testFile import write_yaml


def getToken():
    data = read_yaml.readYaml()['routes']['登录接口']['登录']
    res = requests_public.requests_public(data)
    token = res['data']['token']
    uid = res['data']['uid']
    suid = res['data']['suid']
    code_id = res['data']['code_id']
    write_yaml.writeYaml(token, uid, suid, code_id)


getToken()
